from django.conf.urls import include, url
from store.views import *
from django.views.generic import TemplateView,DetailView
from store.models import *
from DjangoUeditor import urls as DjangoUeditor_urls
urlpatterns = [
    url(r'^$', index, name='index'),
    url(r'^products/$', products, name='products'),
    url(r'^register/$', do_reg, name='register'),
    url(r'^login/$', do_login, name='login'),
    url(r'^logout/$', do_logout, name='logout'),

    url(r'^detail/$', detail, name='detail'),

    url(r'^view_cart/$', view_cart, name='view_cart'),
    url(r'^add_cart/$', add_cart, name='add_cart'),
    url(r'^clean_cart/$', cleanCart, name='clean_cart'),

    url(r'discount/$', getDiscount, name='discount'),

    url(r'^article/(?P<slug>\w+).html$',ArticleView.as_view()),
    url(r'^anli_list/$',anli_list,name='anli_list'),
    url(r'^anli_detail/$',anli_detail,name='anli_detail'),
    url(r'^all/$',AllView.as_view()),
    url(r'^search/$',SearchView.as_view()),
    url(r'^tag/$',TagView.as_view()),
    url(r'^cate/(?P<category>\w+)/$', CateView.as_view()),

    url(r'^ueditor/', include(DjangoUeditor_urls)),
]
